package com.c.ctgproject.ui.collect

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.c.ctgproject.utils.MyLog

class CarListViewModel:ViewModel() {
     private val _machSelected: MutableLiveData<Boolean> = MutableLiveData()
    val machSelected: LiveData<Boolean> get() = _machSelected
    private val _searchMine:MutableLiveData<Boolean> = MutableLiveData()
    val searchMine:LiveData<Boolean>get() = _searchMine
    init {
        _searchMine.value?:false
    }
    fun changeSearchMine(data:Boolean){
        _searchMine.value=data
    }
    fun changeStatus(){
        _machSelected.value?.let { MyLog.d(it) }
        if(_machSelected.value==null){
            _machSelected.value=false
        }else{
            _machSelected.value= !_machSelected.value!!
        }
    }
}